import axios from 'axios';

let base = '';

export const requestLogin = params => { return axios.post(`${base}/login`, params).then(res => res.data); };

export const getUserList = params => { return axios.get(`${base}/user/list`, { params: params }); };

export const getUserListPage = params => { return axios.get(`${base}/user/listpage`, { params: params }); };

export const removeUser = params => { return axios.get(`${base}/user/remove`, { params: params }); };

export const batchRemoveUser = params => { return axios.get(`${base}/user/batchremove`, { params: params }); };

export const editUser = params => { return axios.get(`${base}/user/edit`, { params: params }); };

export const addUser = params => { return axios.get(`${base}/user/add`, { params: params }); };

export const getTaskList = params => { return axios.get('/api/task/get_list', { params: params }); };
export const getDataList = params => { return axios.get('/api/task/get_data_list', { params: params }); };
export const getCheckList = params => { return axios.get('/api/task/get_check_list', { params: params }); };

export const passCheck = params => { return axios.get('/api/task/pass_check', { params: params }); };
export const preventCheck = params => { return axios.get('/api/task/prevent_check', { params: params }); };
export const passData = params => { return axios.get('/api/task/pass_data', { params: params }); };
export const preventData = params => { return axios.get('/api/task/prevent_data', { params: params }); };
